package com.itheima.client.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheim.client.vo.FlavorsVo;
import com.itheima.admin.pojo.Flavors;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author longbosheng
 * @Date 2022/6/16 11:28
 * @PackageName:com.itheima.mapper
 * @ClassName: Flavors
 * @Description: TODO
 * @Version 1.0
 */
@Mapper
public interface CFlavorsMapper extends BaseMapper<Flavors> {
    /**
     * 查询对应的口味(菜品列表)
     * @param dishId
     * @return
     */
    @Select("select * from flavors where dish_id = #{dishId}")
    List<Flavors> selectFlavors(String dishId);

    /**
     * 按id查询菜品口味(套餐下的菜品详情)
     * @param dishId
     * @return
     */
    @Select("select * from flavors where dish_id = #{dishId}")
    List<FlavorsVo> selectFlavorsById(String dishId);
}
